/**
 * 
 */
package pyrachnid.model.pathFinderModel;

import java.util.ArrayList;

import pyrachnid.model.ground_model.Map;
import pyrachnid.model.ground_model.Cell;
import pyrachnid.model.robot_model.Robot;

public abstract class pathFind {
	protected Map map;
	protected Noeud m_source;
	protected Noeud m_target;
	
	
	public final ArrayList<Cell> getShorterPath(Map p_map, Cell p_source, Cell p_target, Robot p_robot) {
		map = p_map;
		map.generateNoeud(p_target, p_robot);
		
		m_source = map.getNoeud(p_source);
		m_target = map.getNoeud(p_target);
		
		return compute();
	}

	protected abstract ArrayList<Cell> compute();
}

